package com.suny.AccountInfo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Schema(description = "修改人员实体")
@Data
public class AccountInfoPutDTO {
    /**
     * 用户账号
     */
    @NotNull(message = "用户账号不能为空")
    @Schema(name = "account", description = "用户账号")
    private String account;

    /**
     * 用户姓名
     */
    @Schema(description = "用户姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(max = 10, message = "姓名最长10个字符")
    private String accName;
    /**
     * 用户密码，默认手机号后6位
     */
    @NotNull(message = "用户密码不能为空")
    @Schema(name = "password", description = "用户密码，默认手机号后6位")
    private String password;

    /**
     * 手机号11位
     */
    @Schema(description = "手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @NotBlank(message = "手机号不能为空")
    private String accPhone;
}
